using System;
using System.Collections.Generic;
using System.Text;
using FriendsNearby.Services.Entities;
using InSTEDD.Labs.Geo;

namespace FriendsNearby.Services.Tests.Mocks
{
    public class MockLocationService : ILocationService
    {
        #region ILocationService Members

        public void InitializeLocation(string userId)
        {
        }

		public Dictionary<string, UserInfo> CurrentLocations = new Dictionary<string, UserInfo>();

        public UserInfo GetCurrentLocation(string userId)
        {
			UserInfo info;
			CurrentLocations.TryGetValue(userId, out info);
			return info;
        }

        public void SetCurrentLocation(string userId, LatLong location)
        {
			CurrentLocations[userId] = new UserInfo { FacebookUserId = userId, Location = location };
        }

        public void RemoveLocation(string userId)
        {
            CurrentLocations.Remove(userId);
        }

        public UserInfo GetLocationAt(string userId, DateTime pointInTime)
        {
            UserInfo info;
            CurrentLocations.TryGetValue(userId, out info);
            info.LastLocationUpdate = pointInTime;
            return info;
        }

        public DateTime GetLastNotificationDate(string user)
        {
            throw new NotImplementedException();
        }

        public UserInfo GetLastLocationInfo(string facebookUserId)
        {
            throw new NotImplementedException();
        }



        public void SaveLastNotificationDate(string user, DateTime dateTime)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
